#include<iostream>
using namespace std;

#include<cstring>
#include<cerrno>

#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>

int main()
{
  int fd = open("./test.txt", O_RDONLY);
  cout << fd << endl;

  int res = close(fd);
  cout << fd << ":" << res << endl;

  res = close(fd);
  cout << fd << ":" << res << endl;
  cout << strerror(errno) << endl;

  return 0;
}
